#include <iostream>
using namespace std;
#include <vector>
#include <string>
#include <map>



void stock(int num , char* argv[], map<string , vector<string>>& result)
{
  int i = 1;
  if (num == 1)
  {
    return;
  }
  string key;
  vector<string> value;
  while (argv[i])
  {
    if (argv[i][0] == '-')
    {
      if (key != "")
      {
        result[key] = value;
        value.clear();
      }

      key = argv[i];
    }
    else 
    {
      value.push_back(argv[i]);
    }
    i++;
  }

  result[key] = value;
}

void print( map<string , vector<string>>& result)
{
  for (auto x : result)
  {
    cout << x.first << " ";
    for (auto y : x.second)
    {
      cout << y << " ";
    }
    cout << endl;
  }
}


int main(int argc , char* argv[])
{
  map<string , vector<string>> result;
  stock(argc , argv , result);
  print(result);
  return 0;
}
